var ipfsAPI = require('ipfs-api')
 
// connect to ipfs daemon API server
var ipfs = ipfsAPI('localhost', '5001', {protocol: 'http'})

let buffer = Buffer.from('你好啊', 'utf-8')
console.log(buffer)
ipfs.add(buffer).then(console.log)